package com.mjk.common.ai.entity;

import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.annotation.ArcSharding;
import com.mjk.common.core.jdbc.annotation.Filed;
import com.mjk.common.core.jdbc.annotation.Id;
import com.mjk.common.core.jdbc.service.idgenerator.IdGenerateType;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 * 会话表
 * </p>
 *
 * @author moyz
 * @since 2023-04-11
 */
@Data
@ArcSharding(dataSource = "pg", table = "adi_conversation")
public class Conversation extends BaseEntity {

    @Id(type = IdGenerateType.AUTO_UUID)
    private Long id;

    @Filed(cloum = "create_time")
    private LocalDateTime createTime;

    @Filed(cloum = "update_time")
    private LocalDateTime updateTime;

    @Filed(cloum = "is_deleted", comment = "是否删除（0：未删除，1：已删除）")
    private Boolean isDeleted;

    @Filed(cloum = "user_id", comment = "用户id")
    private Long userId;

    @Filed(cloum = "uuid", comment = "对话uuid")
    private String uuid;

    @Filed(cloum = "title", comment = "会话标题")
    private String title;

    @Filed(cloum = "remark", comment = "描述")
    private String remark;

    @Filed(cloum = "tokens", comment = "消耗的token数量")
    private Integer tokens;

    @Filed(cloum = "understand_context_enable", comment = "是否开启理解上下文的功能")
    private Boolean understandContextEnable;

    @Filed(cloum = "ai_system_message", comment = "set the system message to ai, ig: you are a lawyer")
    private String aiSystemMessage;

    @Filed(cloum = "llm_temperature", comment = "请求LLM时的temperature")
    private Double llmTemperature;
}
